CREATE OR REPLACE FUNCTION search1(text[]) RETURNS SETOF company_regions AS $$ BEGIN RETURN QUERY SELECT * FROM company_regions WHERE country_name = ANY($1); END $$ LANGUAGE plpgsql STABLE